import org.junit.jupiter.api.Test;
import redis.clients.jedis.Jedis;

/**
 * @author LENOVO
 * @Date 2022-11-16
 */

public class testRedis {

    @Test
    public void selectAndUpdateRedis()
    {
            //创建连接
        Jedis jedis = new Jedis("192.168.56.101", Integer.parseInt("6379"));
        jedis.auth("123456");
            // 配置
        jedis.set("name", "张三");
        String name = jedis.get("name");
        System.out.println("name:"+name);
    }

}
